<template>
	<scroll-view scroll-x class="pz_box cardCont hd">
		<view v-for="(item, index) in list" :key="index" class="pz_box_item"
			@click="jump2('/pages/integral/detail?id=',item.id+'&type='+item.type)">
			<image class="pzImg" :src="item.type=='1'?item.img_url:ossHost+'/member/20200412/hb1.png'"></image>
			<view class="pz_box_item_box">
				<view class="f32 c1 limit-1-line">
					{{item.name}}
				</view>
				<view class="redColor f24">
					<text class="fw5 f36" style="margin-right: 5rpx;">{{item.price}}</text>积分
				</view>
			</view>
		</view>
	</scroll-view>
</template>

<script>
	export default {
		props: {
			list: {
				type: Array,
				default: () => []
			}
		},
		data() {
			return {}
		},
		methods: {
			jump(url, params, a) {
				this.$app.jump(url, params, a);
			},
			jump2(url, params, a) {
				this.$app.jump2(url, params, a);
			}
		}

	}
</script>
<style lang="scss" scoped>
	.pz_box {
		white-space: nowrap;
		display: flex;

		.pzImg {
			vertical-align: top;
		}

		.pz_box_item {
			border-radius: 8rpx;
			background-color: #FFFFFF;
			position: relative;
			overflow: hidden;
		}



		.pz_box_item {
			width: 310rpx;
			display: inline-block;
			margin-right: 20rpx;

			&:last-of-type {
				margin-right: 0;
			}

			.pzImg {
				width: 100%;
				height: 310rpx;
			}

			.pz_box_item_box {
				position: static;
				box-sizing: border-box;
				padding: 20rpx 24rpx;

			}
		}
	}
</style>